package src.messagesToServer;

import src.messagesToClient.MessageToClient;
import src.serverSide.Control;

/**
 * This class is a command to the server to change the permission of the given user
 * @author John Stewart
 */
public class SetPermission extends MessageToServer {
	private int dataid;
	private int permission;
	
	public SetPermission(int newdataid, int newpermission) {
		dataid = newdataid;
		permission = newpermission;
	}

	@Override
	public MessageToClient execute(String address, Control control) {
		return control.setPermission(address, dataid, permission);
	}

}
